@extends('admin.layout.index')

@section('content')

<div class="portlet-body form">

	<!-- BEGIN FORM-->

	<form action="/cate/insert" method = "post" id="form_sample_1" class="form-horizontal">
				{{ csrf_field() }}
		<div class="control-group">

			<label class="control-label">分类添加</label>

			<div class="controls">

				<input name="name" type="text" class="span6 m-wrap"/>

			</div>

		</div>

		<div class="control-group">

			<label class="control-label">父类名称<span class="required">*</span></label>

			<div class="controls">

				<select class="span6 m-wrap" name="pid">

					<option value="0">---请选择---</option>
                        
					@foreach($data as $k=>$v)
                        <option value="{{$v['id']}}" {{$v['id']==$id ? 'selected' : ''}}>{{$v['name']}}</option>
                    @endforeach

					
				</select>

			</div>

		</div>

		<div class="form-actions">

			<input type="submit" class="btn purple">

			<input type="reset" class="btn">

		</div>

	</form>

	<!-- END FORM-->

</div>
@endsection